#include <stdio.h>
#include <math.h>

int main()
{
	double x;
	printf("input x:");
	printf("result:%lf\n", ((scanf("%lf", &x) , (x < 1)) ? pow(x, 4) - 2 * pow(x, 3) + 3 : sqrt(x - 1) + 2));
	return  0;
}
